import { RouteRecordRaw } from "vue-router";
import { Layout } from "@/router";

const knowledgeRoutes: RouteRecordRaw = {
  path: "/knowledge",
  component: Layout,
  redirect: "/knowledge/chat",
  name: "Knowledge",
  meta: {
    title: "知识库管理",
    icon: "book",
    hidden: false,
  },
  children: [
    {
      path: "chat",
      component: () => import("@/views/knowledge/chat/index.vue"),
      name: "KnowledgeChat",
      meta: {
        title: "智能问答",
        icon: "chat",
        hidden: false,
        keepAlive: true,
      },
    },
    {
      path: "manage",
      component: () => import("@/views/knowledge/manage/index.vue"),
      name: "KnowledgeManage",
      meta: {
        title: "知识库管理",
        icon: "management",
        hidden: false,
        keepAlive: true,
      },
    },
  ],
};

export default knowledgeRoutes;
